<?

$fs_ord_man_orders = new Fieldset (array (
	db_conn=>$_GLOBAL_DBH,
	relation=>"ord_man_orders",
	title=>"Order Management",
	fieldset=>array (
		array (name=>"id",label=>"ID",type=>"numeric",
				value=>$_REQUEST["order_id"],
				input=>"hidden",primary_key=>true),
		array (name=>"employee_id",label=>"Employee",type=>"any",
				relation=>array(foreign=>"ord_man_employees",key=>"id",
				field=>"name"),
				input=>"select",
				options=>"_app_select_query",
				options_params=>"SELECT id,name FROM ord_man_employees",
				columns=>array (key=>"id",value=>"name"),
		),
		array (name=>"customer_id",label=>"Customer",type=>"any",
				relation=>array(foreign=>"ord_man_employees",key=>"id",
				field=>"name"),
				input=>"select",
				options=>"_app_select_query",
				options_params=>"SELECT id,name FROM ord_man_employees",
				columns=>array (key=>"id",value=>"name"),
		),
		array (name=>"freight_charge",label=>"Freight Charge",type=>"decimal",
				input=>"field", optional=>true),
		array (name=>"sales_tax_rate",label=>"Sales Tax Rate",type=>"decimal",
				input=>"field", optional=>true),
		array (name=>"po_number",label=>"PO Number",type=>"any",
				input=>"field", optional=>true),
		array (name=>"order_date",label=>"Order Date",type=>"any",
				input=>"date",value=>_app_date("order_date")),
		array (name=>"order_total",label=>"Order total",type=>"decimal",
				input=>"field"),
		array (name=>"shipped",label=>"Shipped",type=>"any",
				input=>"field", optional=>true),
		array (name=>"ship_date",label=>"Ship Date",type=>"any",
				input=>"date",value=>_app_date("ship_date")),),
		array (name=>"total_payments",label=>"Total Payments",type=>"any",
				input=>"field", optional=>true),
	),
));

$fs_ord_man_orders->parse ();

?>
